package com.example.demo02.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo02.dao.StatCouponShopMapper;
import com.example.demo02.entity.StatCouponShop;
import com.example.demo02.service.StatCouponShopService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StatCouponShopServiceImpl extends ServiceImpl<StatCouponShopMapper, StatCouponShop> implements StatCouponShopService {
    @Override
    public void updateUseCount() {
        LambdaUpdateWrapper<StatCouponShop> updateWrapper = new LambdaUpdateWrapper<>();
        updateWrapper.set(StatCouponShop::getUseNum,999).set(StatCouponShop::getUseAmount,888)
                .eq(StatCouponShop::getDiscountType,"2");
        this.update(updateWrapper);
    }

}
